/*
 * @project-name workflow
 * @Description: 
 * @author lenovo whr2349
 * @date 2021/6/30 13:58
 * @file BaseController
*/
"use strict"
const { Controller } = require('egg');
class BaseController extends Controller {
    // get user() {
    //     return this.ctx.session.user;
    // }

    success(data) {
        this.ctx.body = {
            success: true,
            data,
        };
    }

    notFound(msg) {
        msg = msg || 'not found';
        this.ctx.throw(404, msg);
    }
}
module.exports = BaseController;